<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>添加网点</title>
<script type="text/javascript">
	/**查找带回机构信息*/
	function lookUpExpressCompany() {
		$.pdialog.open('expressCompanyLookUp', 'organization', '公司信息', {
			width : 800,
			height : 400,
			mask : true
		});
	}
	
	
	/**
	 * 选择省市区，触发变化，表单参数值传入隐藏域
	 */
	function areaOnChange(obj,str){
		var $obj = $(obj);
		var text = $obj.find("option:selected").text();
		$("#"+str).val(text); 
	}


</script>
</head>
<body>
	<div class="pageContent">
		<form class="pageForm required-validate" method="post" action="addNetsiteAction.action" onsubmit="return validateCallback(this, navTabAjaxDone);">
			<input type="hidden" name="rightId" value="${rightId}" />
			<div class="pageFormContent" layoutH="56">
					<HR align=left width="30%" SIZE=2/>
				<h1 style="color:red;font-size:150%">网点信息</h1>
				<table>
					<tr>
						<td>网点名称：</td>
						<td><input name="name" type="text" size="30" class="required textInput valid" /></td>
					</tr>

					<!--查找带回 -->
					<tr>
						<td>所属公司：</td>
						<td><input type="text" class="required"  bringBackName="expressCompanyName" name="expressCompanyName" readonly="readonly" size="30" class="required textInput valid" /> 
						<input type="hidden" name="expressCompanyId"  bringBackName="expressCompanyId"/> <a class="btnLook" href="javascript:void(0);" onclick="lookUpExpressCompany()">查找带回</a></td>
					</tr>
					<!-- <tr>
						<td>唯一编码：</td>
						<td><input name="code" type="text" size="30" class="required textInput valid" /></td>
					</tr> -->
					<tr>
						<td>联系电话：</td>
						<td><input name="telephone" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>手机号码：</td>
						<td><input name="mobile" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>省市区：</td>
						<td><select onChange="areaOnChange(this,'provinceName')" class="combox" name="provinceId" ref="combox_city" refUrl="getAreasNolimitAction.action?parentId={value}">
								<option value="" >不限</option>
								<c:forEach items="${areaList}" var="li">
									<option value="${li.id}">${li.name}</option>
								</c:forEach>
						</select> <select onChange="areaOnChange(this,'cityName')" class="combox" name="cityId" id="combox_city" ref="combox_area" refUrl="getAreasNolimitAction.action?parentId={value}">
						</select> <select onChange="areaOnChange(this,'districtName')" class="combox" name="districtId" id="combox_area">
						</select></td>
					</tr>
					<tr>
						<td>详细地址：</td>
						<td><input name="address" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td><span>开始取件时间：</span></td>
						<td><span><select name="startTime" style="width: 193px">
									<option value="8时">8时</option>
									<option value="9时">9时</option>
									<option value="10时">10时</option>
									<option value="11时">11时</option>
									<option value="12时">12时</option>
									<option value="13时">13时</option>
									<option value="14时">14时</option>
									<option value="15时">15时</option>
									<option value="16时">16时</option>
									<option value="17时">17时</option>
									<option value="18时">18时</option>
									<option value="19时">19时</option>
									<option value="20时">20时</option>
							</select></span></td>
					</tr>
					<tr>
						<td>结束取件时间：</td>
						<td><span><select name="endTime" style="width: 193px">
									<option value="8时">8时</option>
									<option value="9时">9时</option>
									<option value="10时">10时</option>
									<option value="11时">11时</option>
									<option value="12时">12时</option>
									<option value="13时">13时</option>
									<option value="14时">14时</option>
									<option value="15时">15时</option>
									<option value="16时">16时</option>
									<option value="17时">17时</option>
									<option value="18时">18时</option>
									<option value="19时">19时</option>
									<option value="20时">20时</option>
							</select></span></td>
					</tr>
					<tr>
						<td>网点状态：</td>
						<td><select class="" name="enabled" style="width: 193px" disabled="disabled">
								<option value="0">禁用</option>
						</select></td>
					</tr>
					
					<tr>
					<td>支持打印：</td>
						<td><select class="" name="supportPrint" style="width: 193px">
								<option value="1">支持</option>
								<option value="0">不支持</option>
						</select></td>
					</tr>
					<tr>
					<td>支持支付：</td>
						<td><select class="" name="supportPay" style="width: 193px">
								<option value="1">支持</option>
								<option value="0">不支持</option>
						</select></td>
					</tr>
					<tr>
					<td>支持优惠：</td>
						<td><select class="" name="supportSale" style="width: 193px">
								<option value="1">支持</option>
								<option value="0">不支持</option>
						</select></td>
					</tr>
					
					<tr>
					<td>支持一小时取件：</td>
						<td><select class="" name="supportOneHour" style="width: 193px">
								<option value="1">支持</option>
								<option value="0">不支持</option>
						</select></td>
					</tr>
					
					<tr>
						<td>负责人姓名：</td>
						<td><input name="principal" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>登录账户：</td>
						<td><input name="principalAccount" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>登录密码：</td>
						<td><input name="principalPwd" type="password" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
					</tr>
				</table>
				<!--传参 -->
				<div>
					<input id="provinceName" type="hidden" name="provinceName" class="required textInput valid"> <input id="cityName" type="hidden" name="cityName" class="required textInput valid"> <input id="districtName" type="hidden" name="districtName" class="required textInput valid">
				</div>
					<HR align=left width="30%" SIZE=2/>
				<h1 style="color:red;font-size:150%">网点概述</h1>
				<table>
				<tr>
						<td>&nbsp;&nbsp;&nbsp;</td>
				</tr>

				<tr>
						<td>日派件量：</td>
						<td><input name="sendAmountEveryday" type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" size="30" class="required textInput valid" /></td>
				</tr>
				<tr>
						<td>日取件量：</td>
						<td><input name="getAmountEverydat" type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" size="30" class="required textInput valid" /></td>
				</tr>
				<tr>
						<td>快递员数量：</td>
						<td><input name="courierAmount" type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" size="30" class="required textInput valid" /></td>
				</tr>
				<tr>
						<td>客服数量：</td>
						<td><input name="customerServiceAmount" type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" size="30" class="required textInput valid" /></td>
				</tr>
				
				<tr>
						<td>经营时间/状况：</td>
						<td><input name="conditions" type="text" size="30" class="required textInput valid" /></td>
				</tr>
				<tr>
						<td>区域特点：</td>
						<td>
						<textarea name="regionalFeatures" rows="8" cols="40" class="required textInput valid" >三商务楼数量、居民楼数量、位置特点</textarea>
						</td>
				</tr>					
				</table>
				
				<HR align=left width="30%" SIZE=2/>
				<h1 style="color:red;font-size:150%">市场概述</h1>
				<table>
				<tr>
						<td>&nbsp;&nbsp;&nbsp;</td>
				</tr>

				<tr>
					<td>开拓时间：</td>
					<td><input  type="text" class="date" name="createTime" 
							readonly="readonly" />
					</td>
				<tr>
						<td>市场负责人：</td>
						<td><input name="BDprincipal" type="text"  size="30" class="required textInput valid" /></td>
				</tr>
				<tr>
						<td>订单目标：</td>
						<td><input name="orderTarget" type="text"  size="30" class="required textInput valid" /></td>
				</tr>
				<tr>
						<td>所需人员及物料：</td>
						<td>
						<textarea name="requiredPersonsMaterials" rows="3" cols="40" class="required textInput valid" ></textarea>
						</td>
				</tr>
				<tr>
						<td>推广策略：</td>
						<td>
						<textarea name="strategy" rows="3" cols="40" class="required textInput valid" ></textarea>
						</td>
				</tr>				
				<tr>
						<td>费用投入预算：</td>
						<td>
						<textarea name="budget" rows="3" cols="40" class="required textInput valid" ></textarea>
						</td>
				</tr>	
				</table>
			</div>
			<div class="formBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">保存</button>
							</div>
						</div>
					</li>
					<li>
						<div class="button">
							<div class="buttonContent">
								<button type="button" class="close">取消</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</form>
	</div>
</body>
</html>